cmake_minimum_required(VERSION 3.0.2)
project(img_pub_sub)


set (CMAKE_CXX_STANDARD 11)

find_package(catkin_simple REQUIRED)
find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)

catkin_simple()

# cs_add_library(my_lib src/my_lib.cpp)

cs_add_executable(img_view src/img_view.cpp)
cs_add_executable(img_pub src/img_pub.cpp)
cs_add_executable(pcd_pub src/pcd_pub.cpp)
cs_add_executable(pcd_view src/pcd_view.cpp)

include_directories(${OPENCV_INCLUDE_DIR})
include_directories(${PCL_INCLUDE_DIRS})

target_link_libraries(img_view ${OpenCV_LIBS}) 
target_link_libraries(img_pub ${OpenCV_LIBS}) 
target_link_libraries(pcd_pub ${PCL_LIBRARIES} ${OpenCV_LIBS}) 
target_link_libraries(pcd_view ${PCL_LIBRARIES}) 


# target_link_libraries(my_exec my_lib)

cs_install()
cs_install_scripts(scripts/img_view.py)
cs_install_scripts(scripts/img_pub.py)

install(DIRECTORY img/
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/img)
# cs_install_scripts(scripts/my_script.py)

cs_export()
